USE DB_TCC
IF EXISTS(SELECT 1 FROM SYSOBJECTS WHERE NAME LIKE 'P_CLIENTE_ALTERAR')
	DROP PROCEDURE P_CLIENTE_ALTERAR
GO
CREATE PROCEDURE P_CLIENTE_ALTERAR(
	@IDCLIENTE		VARCHAR(100),
	@NOMECLIENTE	VARCHAR(100),
	@DESCCLIENTE	VARCHAR(255),
	@USUARIO		VARCHAR(100))
AS BEGIN
	UPDATE
		CLIENTE
	SET
		CLI_NMCLIENTE = @NOMECLIENTE,
		CLI_DESCCLIENTE = @DESCCLIENTE,
		CLI_NMUSUARIOALTERACAO = @USUARIO,
		CLI_DTHRALTERACAO = GETDATE()
	FROM
		CLIENTE
	WHERE
		CLI_IDCLIENTE = @IDCLIENTE
END